import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { DateDiff, DateStamp, FormatnumberZero, Mover, NumberDivide } from '@/function.js';
// 视图插件
import { Form } from 'antd';
import { TimelineChartFu } from '@/components/Charts';
// 外部组件
import Loading from '@/components/Loading/Loading';
import Echarts from './Echarts';
// css OR less预编译器

// 图片

/**
 *  Describe:数据连接
 *  Created by xjc on 2019/5/15
 */

@connect(({ newTwoDaily }) => ({
  newTwoDaily,
}))
@Form.create()
class Fundanalysis extends PureComponent {
  componentWillMount() {}

  /**
   *  Describe:当前状态
   *  Created by xjc on 2019/5/15
   */

  state = {};

  /**
   *  Describe:视图
   *  Created by xjc on 2019/5/15
   */

  render() {
    const { charts } = this.props;
    return (
      <div>
        {!charts.list ? (
          <Loading />
        ) : (
          <div>
            <Echarts data={charts.list} mainId="TwoEcharts" />
            {/* <div style={{ position: 'absolute', width: '20px', wordWrap: 'break-word', marginTop: 280 }}>超额收益</div> */}
            {/* <div style={{ position: 'absolute',right:16,width: '20px', wordWrap: 'break-word', marginTop: 280}}>净值</div> */}
            {/* <TimelineChartFu height={628} orSliderGen={true} data={charts.list} titleMap={{y1: '新二号', y2: 'SPY', y3: '比较值'}}/> */}
            <br />
            <br />
          </div>
        )}
      </div>
    );
  }

  componentWillUnmount() {}
}

export default Fundanalysis;
